-
Notifications
You must be signed in to change notification settings - Fork 769
[SYCL] Hide inline definitions of stdio functions #18174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
MSVC's inline definitions of stdio functions such as printf() are only meant for host code; device code cannot call them. Device code can, however, call ext::oneapi::experimental::printf() which depending on the target is implemented as a call to the global printf(). The availability of a definition of the global host printf() makes it more difficult to handle in device code, so hide it.
This fixes at least one SYCL E2E test ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not aware of implications of always enabling this macro, @AaronBallman can you maybe weigh in?
For the avoidance of confusion, this is inside a |
|
@intel/llvm-gatekeepers This can be merged, thanks. |
MSVC's inline definitions of stdio functions such as printf() are only meant for host code; device code cannot call them. Device code can, however, call ext::oneapi::experimental::printf() which depending on the target is implemented as a call to the global printf(). The availability of a definition of the global host printf() makes it more difficult to handle in device code, so hide it.